﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="wsccprototype.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <br />
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
    BackColor="#D8D8DA" BorderColor="#4E5557" BorderStyle="Groove" 
    BorderWidth="2px" CssClass="datagrid" DataKeyNames="ID" 
    DataSourceID="detailsdatasource" Font-Bold="False" Font-Italic="False" 
    Font-Names="Deneane" Font-Overline="False" Height="126px" Width="978px">
    <Fields>
        <asp:BoundField DataField="model" HeaderText="Model Number:" 
            SortExpression="model" />
        <asp:BoundField DataField="body_type" HeaderText="Body Type:" 
            SortExpression="body_type" />
        <asp:BoundField DataField="production_year" HeaderText="Manufacture Year: " 
            SortExpression="production_year" />
        <asp:BoundField DataField="features" HeaderText="Specifications:" 
            SortExpression="features" />
        <asp:BoundField DataField="price" HeaderText="Price:" SortExpression="price" />
        <asp:BoundField DataField="michelin_stars" HeaderText="Michelin Stars:" 
            SortExpression="michelin_stars" />
        <asp:HyperLinkField DataNavigateUrlFields="official_site_link" 
            HeaderText="Official Weblink:" Text="Click Me Please" />
    </Fields>
</asp:DetailsView>
<br />
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="detailsdatasource" Height="504px" 
        Width="979px" CssClass="datagrid">
    <Columns>
        <asp:ImageField DataImageUrlField="car_picture" HeaderText="Full Image">
            <ControlStyle CssClass="detailspicture" />
        </asp:ImageField>
    </Columns>
</asp:GridView>
<p>
        &nbsp;</p>
<p>
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="author" HeaderText="author" 
                    SortExpression="author" />
                <asp:BoundField DataField="title" HeaderText="title" SortExpression="title" />
                <asp:BoundField DataField="commentbody" HeaderText="commentbody" 
                    SortExpression="commentbody" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
            ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
            SelectCommand="SELECT [author], [title], [commentbody] FROM [comments] WHERE ([cars_fk_id] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="cars_fk_id" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
<p>
        <asp:SqlDataSource ID="detailsdatasource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
            ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
            SelectCommand="SELECT [model], [michelin_stars], [ID], [production_year], [body_type], [price], [features], [car_picture], [official_site_link] FROM [cars] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        Author: 
        <asp:TextBox ID="txtbox_author" runat="server" Height="22px"></asp:TextBox>
    </p>
    <p>
        Title:
        <asp:TextBox ID="txtbox_title" runat="server"></asp:TextBox>
&nbsp;</p>
    <p>
        <asp:TextBox ID="txtbox_commentbody" runat="server" Height="156px" 
            TextMode="MultiLine" Width="484px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Height="25px" Text="Comment" 
            Width="83px" />
    </p>
    <p>
        <asp:CheckBoxList ID="cb_tags" runat="server" 
            DataSourceID="SqlDataSource2" DataTextField="tagname" DataValueField="ID" 
            RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        <br />
        <asp:Button ID="Button2" runat="server" Text="Tag Car" />

        Add New Tag<asp:TextBox ID="tb_newtag" runat="server"></asp:TextBox>
        <asp:Button ID="btn_newtag" runat="server" Text="Add Tag" />

        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
            ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
            SelectCommand="SELECT [ID], [tagname] FROM [tags]"></asp:SqlDataSource>
    </p>
</asp:Content>
